using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._MeasuringGeographicDistributions
{
    /// <summary>
    /// <para>Central Feature</para>
    /// <para>Identifies the most centrally located feature in a point, line, or polygon feature class.</para>
    /// <para>标识点、线或面要素类中位于最中心的要素。</para>
    /// </summary>    
    [DisplayName("Central Feature")]
    public class CentralFeature : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CentralFeature()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Feature_Class">
        /// <para>Input Feature Class</para>
        /// <para>The feature class containing a distribution of features from which to identify the most centrally located feature.</para>
        /// <para>包含要素分布的要素类，从中识别位于最中心的要素。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will contain the most centrally located feature in the Input Feature Class.</para>
        /// <para>将包含输入要素类中位于最中心的要素的要素类。</para>
        /// </param>
        /// <param name="_Distance_Method">
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how distances are calculated from each feature to neighboring features.</para>
        ///   <bulletList>
        ///     <bullet_item>Euclidean—The straight-line distance between two points (as the crow flies)</bullet_item><para/>
        ///     <bullet_item>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算从每个要素到相邻要素的距离。</para>
        ///   <bulletList>
        ///     <bullet_item>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</bullet_item><para/>
        ///     <bullet_item>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CentralFeature(object _Input_Feature_Class, object _Output_Feature_Class, _Distance_Method_value _Distance_Method)
        {
            this._Input_Feature_Class = _Input_Feature_Class;
            this._Output_Feature_Class = _Output_Feature_Class;
            this._Distance_Method = _Distance_Method;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Central Feature";

        public override string CallName => "stats.CentralFeature";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Feature_Class, _Output_Feature_Class, _Distance_Method.GetGPValue(), _Weight_Field, _Self_Potential_Weight_Field, _Case_Field];

        /// <summary>
        /// <para>Input Feature Class</para>
        /// <para>The feature class containing a distribution of features from which to identify the most centrally located feature.</para>
        /// <para>包含要素分布的要素类，从中识别位于最中心的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Feature_Class { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will contain the most centrally located feature in the Input Feature Class.</para>
        /// <para>将包含输入要素类中位于最中心的要素的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Distance Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how distances are calculated from each feature to neighboring features.</para>
        ///   <bulletList>
        ///     <bullet_item>Euclidean—The straight-line distance between two points (as the crow flies)</bullet_item><para/>
        ///     <bullet_item>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算从每个要素到相邻要素的距离。</para>
        ///   <bulletList>
        ///     <bullet_item>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</bullet_item><para/>
        ///     <bullet_item>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _Distance_Method_value _Distance_Method { get; set; }

        public enum _Distance_Method_value
        {
            /// <summary>
            /// <para>Euclidean</para>
            /// <para>Euclidean—The straight-line distance between two points (as the crow flies)</para>
            /// <para>欧几里得 - 两点之间的直线距离（乌鸦飞翔时）</para>
            /// </summary>
            [Description("Euclidean")]
            [GPEnumValue("EUCLIDEAN_DISTANCE")]
            _EUCLIDEAN_DISTANCE,

            /// <summary>
            /// <para>Manhattan</para>
            /// <para>Manhattan—The distance between two points measured along axes at right angles (city block); calculated by summing the (absolute) difference between the x- and y-coordinates</para>
            /// <para>曼哈顿 - 沿直角轴测量的两点之间的距离（城市街区）;通过将 x 坐标和 y 坐标之间的（绝对）差求和计算得出</para>
            /// </summary>
            [Description("Manhattan")]
            [GPEnumValue("MANHATTAN_DISTANCE")]
            _MANHATTAN_DISTANCE,

        }

        /// <summary>
        /// <para>Weight Field</para>
        /// <para>The numeric field used to weight distances in the origin-destination distance matrix.</para>
        /// <para>用于在起点-目的地距离矩阵中对距离进行加权的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Weight_Field { get; set; } = null;


        /// <summary>
        /// <para>Self Potential Weight Field</para>
        /// <para>The field representing self-potential—the distance or weight between a feature and itself.</para>
        /// <para>表示自电位的场 - 特征与自身之间的距离或权重。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Self Potential Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Self_Potential_Weight_Field { get; set; } = null;


        /// <summary>
        /// <para>Case Field</para>
        /// <para>Field used to group features for separate central feature computations. The case field can be of integer, date, or string type.</para>
        /// <para>用于对要素进行分组以进行单独中心要素计算的字段。case 字段可以是整数、日期或字符串类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Case Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Case_Field { get; set; } = null;


        public CentralFeature SetEnv(object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}